/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.ufrgs.inf.prav.jsf;

import br.ufrgs.inf.prav.jsf.components.VideoComponent;
import javax.faces.component.UIComponent;

/**
 *
 * @author Fernando Arena Varella
 * @version 1.0
 */
public class VideoTag extends PravBaseTag {

    //attributes
    private String autoplay = "false", height, posterHref, width;
    private String mobileHref, tvdHref, webHref;

    public VideoTag(){

    }

    @Override
    protected void setProperties(UIComponent component) {
        /* you have to call the super class */
        super.setProperties(component);
        VideoComponent video = (VideoComponent) component;
        video.setAutoplay(autoplay);
        video.setHeight(height);
        video.setPosterHref(posterHref);
        video.setWidth(width);

        video.setMobileHref(mobileHref);
        video.setTvdHref(tvdHref);
        video.setWebHref(webHref);
    }

    @Override
    public String getComponentType() {
        return VideoComponent.COMPONENT_TYPE;
    }

    @Override
    public String getRendererType() {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc="Getters And Setters">
    public String getAutoplay() {
        return autoplay;
    }

    public void setAutoplay(String autoplay) {
        this.autoplay = autoplay;
    }

    public String getHeight() {
        return height;
    }

    public void setHeight(String height) {
        this.height = height;
    }

    public String getPosterHref() {
        return posterHref;
    }

    public void setPosterHref(String posterHref) {
        this.posterHref = posterHref;
    }

    public String getMobileHref() {
        return mobileHref;
    }

    public void setMobileHref(String mobileHref) {
        this.mobileHref = mobileHref;
    }

    public String getTvdHref() {
        return tvdHref;
    }

    public void setTvdHref(String tvdHref) {
        this.tvdHref = tvdHref;
    }

    public String getWebHref() {
        return webHref;
    }

    public void setWebHref(String webHref) {
        this.webHref = webHref;
    }

    public String getWidth() {
        return width;
    }

    public void setWidth(String width) {
        this.width = width;
    }
    // </editor-fold>

}
